---
layout: example-verbatim.html
title: Geolocation Tracking with Orientation
shortdesc: Example of a geolocated and oriented map.
tags: "fullscreen, geolocation, orientation, mobile"
---
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>Mobile Geolocation Tracking with Orientation</title>
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="/theme/ol.css">
    <link rel="stylesheet" type="text/css" href="/theme/site.css">
    <style>
      html, body, .map {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
      }
      #info {
          position: absolute;
          font-size: 0.7em;
          top: 10px;
          right: 10px;
          background-color: lightgrey;
          padding: 4px;
      }
      .geolocate-buttons {
          position: absolute;
          bottom: 40px;
          left: 10px;
      }
    </style>
  </head>
  <body>
    <div id="map" class="map"></div>
    <div id="info"></div>
    <img id="geolocation_marker" src="data/geolocation_marker.png" />
    <div class="geolocate-buttons">
      <button id="geolocate" class="btn btn-primary">Geolocate Me!</button>
      <button id="simulate" class="btn btn-secondary">Simulate</button>
    </div>
    <script src="geolocation-orientation.js"></script>
    <script src="common.js"></script>
  </body>
</html>
